<!DOCTYPE html>
<html lang="en" style="width: 100%;height: 100%;">
<head>
	<meta charset="UTF-8">
	<title>translate</title>
    <script type="text/javascript" src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js"></script>
	<style>
		.body_class {
			top: 0 !important;
			left: 0 !important;
			padding: 10px !important;
			box-sizing: border-box;
			overflow: hidden;
		}
		.goog-te-banner-frame {
			display: none;
		}
		.goog-te-combo {
			width: 100% !important;
		}
		.noselect {
			-khtml-user-select: none;
			user-select: none;
			-moz-user-select: none;
			-webkit-user-select: none;
		}
		.goog-tooltip {
			display: none !important;
		}
		font {
			background-color: transparent !important;
			-webkit-box-shadow: 0px 0px 0px #9999aa !important;
			-moz-box-shadow: 0px 0px 0px #9999aa !important;
			box-shadow: 0px 0px 0px #9999aa !important;
			box-sizing: border-box !important;
			-webkit-box-sizing: border-box !important;
			-moz-box-sizing: border-box !important;
			position: relative !important;
		}
		img {
			width: 42px !important;
			height: 16px !important;
			padding-top: 3px !important;
		}
	</style>
</head>
<body id="body" class="body_class" style="left:0px;top:0px;width:100%; height: 100%;margin:0px;padding:0px;">
	<div id="google_translate_state"></div>
	<div style="overflow: auto; overflow-x: hidden;">
		<div id="google_translate_element" style="width: calc(100% - 15px); word-break: break-word;"></div>
	</div>
	<script>
		var timeOut;
		function googleTranslateElementInit() 
		{
			document.getElementById("google_translate_element").style.height = document.getElementById("body").clientHeight- 60 +"px";
			// const urlParams = new URLSearchParams(window.location.search);
			// console.log(urlParams);
			// document.getElementById("google_translate_element").innerHTML = decodeURIComponent(urlParams.get("text"));
			window.googleTranslator = new google.translate.TranslateElement({
				//pageLanguage: 'en',
				layout: google.translate.TranslateElement.InlineLayout.VERTICAL,
				disableAutoTranslation : false,
			}, 'google_translate_state');
		}
		window.addEventListener('message', function (msg) {
			if (msg.data !== "onchange_goog-te-combo") {
				document.getElementById("google_translate_element").innerHTML = msg.data;
			}
			timeOut = setTimeout(function() {
				document.getElementById("google_translate_element").style.opacity = 1;
			}, 600);
		});
	</script>
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> 
</body>
</html>